﻿
@{
    ViewData["Title"] = "八字简批列表";
    var list = ViewData["list"] as List<article_forecast>;
    var page = ViewData["page"] as PageModel;
    var is_show = (bool)ViewData["is_show"];
}

@section search{
    @Html.Partial("_ManageSearch", new KeyValuePair<string, string>("输入八字,姓名搜索", ViewData["search"].ToString()))
}

<div class="row">
    <div class="col-md-12">
        <ul id="tab-div" class="nav nav-tabs" role="tablist">
            <li class="@(is_show?"":"active")"><a href="@Url.Action("DiviningHideList")" role="tab">未处理<i class="fa">@ViewData["hide-count"]</i> </a></li>
            <li class="@(is_show?"active":"")"><a href="@Url.Action("DiviningList")" role="tab">已处理 <i class="fa">@ViewData["show-count"]</i> </a></li>
        </ul>

        <div id="div-tab-list" class="tab-content">
            <div id="div-show" class="tab-pane active">
                <table class="@ViewHelper.Standard_table_css">
                    <thead>
                        <tr>
                            <th data-column-name="@nameof(article_forecast.horoscope_8char)">八字</th>
                            <th data-column-name="@nameof(article_forecast.born_place)">出生地</th>
                            <th data-column-name="@nameof(article_forecast.born_date)">出生时间</th>
                            <th data-column-name="@nameof(article_forecast.user_nick_name)">昵称</th>
                            <th data-column-name="@nameof(article_forecast.name)">姓名</th>
                            <th data-column-name="@nameof(article_forecast.sex)">性别</th>
                            <th data-column-name="@nameof(article_forecast.create_time)">创建时间</th>
                            <th data-column-name="@nameof(article_forecast.last_update)">修改时间</th>
                        </tr>
                    </thead>
                    <tbody>
                        @{
                            if (list.Count > 0)
                            {
                                foreach (var item in list)
                                {
                                    var href = Url.Action("DivinationDetail", new { id = item.id });
                                    <tr data-id="@item.id">
                                        <td><a href="@href">@item.horoscope_8char</a></td>
                                        <td><a href="@href">@item.born_place</a></td>
                                        <td>@item.born_date.ToLocalDateTimeString()</td>
                                        <td>@item.user_nick_name</td>
                                        <td>@item.name</td>
                                        <td>@(item.sex ? "男" : "女")</td>
                                        <td>@item.create_time.ToLocalDateTimeString()</td>
                                        <td>@item.last_update.ToLocalDateTimeString()</td>
                                    </tr>
                                }
                            }
                            else
                            {
                                @Html.Raw(ViewHelper.Standard_no_record_tr)
                            }
                        }
                    </tbody>
                </table>
                @Html.Partial("Pagination", page)
            </div>
        </div>
    </div>

</div>
